<div class="tableform">
    <h3>期初初始化</h3>
    <div class="division">
     <{if $isSaveInitTime == 'true'}>
     <form method="post" action="index.php?app=finance&ctl=setting_init&act=save_init_time">
     <{/if}>
     <h3>第一步：账期设置</h3>
        <table width="100%" cellspacing="0" cellpadding="0" border="0" >
            <tbody>
              <tr>
                <th style='width:200px;text-align:right;'>账务起始年：</th>
                <td><{input type="select" name="init_time[year]" options=$year value=$init_time.year}></td>
              </tr>
              <tr>
                <th style='width:200px;text-align:right;'>账务起始月：</th>
                <td><{input type="select" name="init_time[month]" options=$month value=$init_time.month}></td>
              </tr>
              <tr>
                <th style='width:200px;text-align:right;'>账务起始日：</th>
                <td><{input type="select" name="init_time[day]" options=$day value=$init_time.day}></td>
              </tr>
            </tbody>
        </table>
        <div class='notice'>
            初始化设置完成后，有数据进入系统，则不能修改！必须清空所有数据才能再次修改！<br/><br/>
            <span style='color:red;'>注意：受支付宝流水接口影响，只能获取近一个月的流水！</span>
        </div>

        <div class="table-action">
           <{if $isSaveInitTime == 'false' || $isInit == 'true'}>
                <{button label="保存" type="button" name="submit" id="btn-setting"  disabled="disabled" }>
           <{else}>
                <{button label="保存" type="submit" name="submit" id="btn-setting"  }>
           <{/if}>
        </div>

    <{if $isSaveInitTime == 'true'}>
    </form>
    <{/if}>
    </div>

    <div class="division">
    <h3>第二步：账期数据导入</h3>
    <{if $isInit == 'false' }>
    <form  method="post" action="index.php?app=finance&ctl=setting_init&act=save_init">
    <input type="hidden" value="true" name="isInit">
    <{/if}>

    <table width="100%" cellspacing="0" cellpadding="0" border="0" >
      <tbody>
        <tr>
          <th style='width:200px;text-align:right;'>选择导入模版：</th>
          <td>
            <input type='button' value='下载模版' <{if $isInit == 'false' || $canImport == 'true' }>onclick="new Dialog('index.php?app=omecsv&ctl=admin_export&act=main&add=finance&ctler=finance_mdl_bill&filter[template]=1',{'title':'<{t}>下载模版<{/t}>','width':400,'height':170});"<{/if}> >
          </td>
        </tr>

        <tr>
        <th style='width:200px;text-align:right;'>导入模版：</th>
        <td>
          <input type='button' value='导入账单' <{if $isInit == 'false' || $canImport == 'true' }>onclick="new Dialog('index.php?app=omecsv&ctl=admin_import&act=main&add=finance&ctler=finance_mdl_bill&filter[checkTime]=before',{'title':'<{t}>导入账单<{/t}>','width':400,'height':180});"<{/if}> >
        </td>
        </tr>
      </tbody>
    </table>

    <div class="table-action">
      <{if $isInit == 'true'}>
        <{button label="初始化完成" type="button" name="submit" id="btn-setting"  disabled="disabled" }>
      <{else}>
        <{button label="初始化完成" type="submit" name="submit" id="btn-setting"}>
      <{/if}>
    </div>

    <{if $isInit == 'false' }>
    </form>
    <{/if}>

    </div>
</div>